package com.glink.manage.dto.temporaryadmission;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.glink.common.serializer.JsonDate3DeSerializer;
import com.glink.common.serializer.JsonDate3Serializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * 人员临时准入，修改
 * @Author : qiushaoshan
 * @create 2025/3/4 10:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TemporaryAdmissionPersonUpdateDTO implements Serializable {

    private static final long serialVersionUID = -6188333732682795788L;

    @ApiModelProperty(value = "主键ID")
    @NotBlank(message = "人员信息不能为空")
    private String objId;
    
    @ApiModelProperty(value = "人员名称/车主姓名")
    @NotBlank(message = "姓名不能为空")
    @Size(max = 250, message = "姓名不能超过250个字符")
    private String name;
    
    @ApiModelProperty(value = "联系电话")
    @Size(max = 20, message = "联系电话不能超过20位")
    private String contactNumber;
    
    @ApiModelProperty(value = "证件号（身份证号/车牌号）")
    @Size(max = 20, message = "证件号不能超过20位")
    private String idNumber;
    
//    @ApiModelProperty(value = "所属单位ID")
//    @NotBlank(message = "所属单位不能为空")
//    private String orgId;
    
    @ApiModelProperty(value = "单位名称")
    @NotBlank(message = "单位不能为空")
    private String unitName;
    
    @ApiModelProperty(value = "所属工程ID")
    @NotBlank(message = "准入工程不能为空")
    private String constructionWorkObjId;
    
    @ApiModelProperty(value = "人脸照片")
    private String profilePicture;
    
    @ApiModelProperty(value = "准入周期开始")
    @NotNull(message = "准入周期开始不能为空")
    @JsonSerialize(using = JsonDate3Serializer.class)
    @JsonDeserialize(using = JsonDate3DeSerializer.class)
    private Date cycleStart;

    @ApiModelProperty(value = "准入周期结束")
    @NotNull(message = "准入周期结束不能为空")
    @JsonSerialize(using = JsonDate3Serializer.class)
    @JsonDeserialize(using = JsonDate3DeSerializer.class)
    private Date cycleEnd;

    @ApiModelProperty(value = "备注")
    @Size(max = 500, message = "事由不能超过500字符")
    private String remark;
}
